<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="icon" href="./images/hospital-icon.png" type="image/x-icon">  <!--在网页标题左侧显示图标-->
    <!--    <link rel="shortcut icon" href="./images/hospital-icon.png" type="image/x-svg">-->
    <link rel="shortcut icon" href="./images/hospital-icon.png" type="image/x-icon"><!--在收藏夹显示图标-->

    <title>登录-门诊管理系统</title>

    <link href="css/style.css" rel="stylesheet">
    <link href="css/iconfont.css" rel="stylesheet">
    <link href="css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9] -->
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->

    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

</head>

<body class="login-body">

<div class="container" id="loginApp">

    <form class="form-signin" action="/login" @submit.prevent="login" method="post">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">账户登录</h1>
            <img style="width: 50px;height: 50px" src="images/hospital-icon.png" alt=""/>
            <span style="color: black;font-size: 26px;text-align: center;font-weight: 600;vertical-align: text-bottom">门诊管理系统</span>
        </div>


        <div id="error" class="alert alert-danger d-none" style="display: none">
            <i class="fa fa-exclamation-triangle"></i> 您的账号或密码错误
        </div>
        <div id="logout" class="alert alert-info d-none" style="display: none">
            <i class="fa fa-exclamation-triangle"></i>  您已登出系统
        </div>
        <div id="register" class="alert alert-success d-none" style="display: none">
            <i class="fa fa-exclamation-triangle"></i>  已经成功注册，请前往登录
        </div>

        <div class="login-wrap">
            <input v-model="oms_username" name="username" type="text" class="form-control" placeholder="请输入用户名" autofocus>
            <input v-model="oms_password" name="password" type="password" class="form-control" placeholder="请输入密码">

            <button class="btn btn-lg btn-login btn-block"  @submit.prevent="login" type="submit">
                <i class="fa fa-check"></i>
            </button>

            <div class="registration">
                还没有账号?
                <a class="" href="registration.html">
                    点此注册
                </a>
            </div>

            <br>
            <div>
                <i class="fa fa-check"></i>
                <a href="http://localhost:9000/oauth/alipay/api/alipayLogin">支付宝登录</a>
            </div>

            <label class="checkbox">
                <input type="checkbox" value="remember-me"> 记住我
                <span class="pull-right">
                    <a data-toggle="modal" href="#myModal"> 已有账号 忘记密码?</a>

                </span>
            </label>

        </div>

        <!-- Modal -->
        <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">已有账号 忘记密码?</h4>
                    </div>
                    <div class="modal-body">
                        <p>请填写绑定的邮箱</p>
                        <input v-model="oms_forgotEmail" type="text" name="email" placeholder="邮箱" autocomplete="off" class="form-control placeholder-no-fix">

                    </div>
                    <div class="modal-footer">
                        <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
                        <button class="btn btn-primary" type="button">提交</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- modal -->

    </form>

</div>



<!-- Placed js at the end of the document so the pages load faster -->

<!-- Placed js at the end of the document so the pages load faster -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>

<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- 生产环境版本，优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<!--axios-->
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.26.1/axios.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"> </script>

<script src="userjs/login.js"></script>

<script>

    if (location.search == "?error"){
        $("#error").removeAttr("style");
    }
    if (location.search == "?logout"){
        $("#logout").removeAttr("style");
    }
    if (location.search == "?register"){
        $("#register").removeAttr("style");
    }

</script>

</body>
</html>
